
import mapper.LoginMapper;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import po.Customer;
import po.Staff;

import service.LoginService;
import service.impl.LoginServiceImpl;

@Service
public class myTestt extends baseTest {

    @Autowired
    LoginMapper loginmapper;

    @Autowired
    LoginService loginService;
    @Test
    public void getpwdbyname() {
        Staff staff = loginmapper.getpwdbyname("Jon");
        String pwd = staff.getPassword();
        System.out.println(pwd);
    }


    @Test
    public void serviceTest(){
        String name = loginService.getpwdbyname("Jon");
        System.out.println(name);

    }

    @Test
    public  void  register(){
        Customer customer = new Customer();
        customer.setUsername("zmh");
        customer.setPassword("123");
        loginService.registerCustomer(customer);
    }

}
